package com.sfeir.poc.portal.gui.client.dnd;


import com.allen_sauer.gwt.dnd.client.PickupDragController;
import com.google.gwt.user.client.ui.AbsolutePanel;

/**
 * 
 * Controller that is applied to the widget drag&drop action
 *
 */
public class WindowController {

	private final AbsolutePanel boundaryPanel;

	private PickupDragController pickupDragController;

	public WindowController(AbsolutePanel boundaryPanel) {
		this.boundaryPanel = boundaryPanel;

		pickupDragController = new PickupDragController(boundaryPanel, true);
		pickupDragController.setBehaviorConstrainedToBoundaryPanel(true);
		pickupDragController.setBehaviorMultipleSelection(false);

	}

	public AbsolutePanel getBoundaryPanel() {
		return boundaryPanel;
	}

	public PickupDragController getPickupDragController() {
		return pickupDragController;
	}

}
